package sort;

import java.util.Arrays;

public class test {
    public static void main(String[] args) {
        int[] arr = new int[]{5,6,9,1,2,4,10};

        InsertSort insertSort = new InsertSort();
        System.out.println("直接插入排序: ");
        insertSort.sort(arr);
        System.out.println(Arrays.toString(arr));
        System.out.println("------------------");

        System.out.println("直接插入排序: ");
        SelectSort selectSort = new SelectSort();
        selectSort.sort(arr);
        System.out.println(Arrays.toString(arr));

        System.out.println("------------------");

        System.out.println("希尔排序: ");
        ShellSort shellSort = new ShellSort();
        shellSort.sort(arr);
        System.out.println(Arrays.toString(arr));

        System.out.println("------------------");

        System.out.println("堆排序: ");
        HeapSort heapSort = new HeapSort();
        heapSort.sort(arr);
        System.out.println(Arrays.toString(arr));

        System.out.println("------------------");
        System.out.println("冒泡排序: ");
        BubbleSort bubbleSort = new BubbleSort();
        bubbleSort.sort(arr);
        System.out.println(Arrays.toString(arr));

        System.out.println("------------------");
        System.out.println("快速排序: ");
        QuickSort quickSort = new QuickSort();
        quickSort.sortNor(arr);
        System.out.println(Arrays.toString(arr));

        System.out.println("------------------");
        System.out.println("归并排序: ");
        MergeSort mergeSort = new MergeSort();
        mergeSort.sort(arr);
        System.out.println(Arrays.toString(arr));

    }
}
